var express = require("express")
var path = require("path")
var app = express() //创建一个服务 

// 配置站点
app.use(express.static(path.join(__dirname, "../site")))

// app.use()  中间件

// 配置路由
var IndexRouter = require("./router/index.js")  // 引入路由配置
var dataRouter = require('./router/data.js')
app.use("/", IndexRouter)
app.use("/data", dataRouter)




app.listen(5000, function () {
    console.log("server is started at localhost:5000")
})